#include "StdAfx.h"
#include "SplitterApplet.h"
#include "ScribbleCanvas.h"

void SplitterApplet::init()
{
	AWTPanel* panel1 = new AWTPanel();
	AWTPanel* panel2 = new AWTPanel();
	AWTPanel* panel3 = new HelloPanel();
	AWTPanel* panel4 = new BorderLayoutPanel();
	AWTCanvas* panel5 = new ScribbleCanvas();
	AWTPanel* panel6 = new BrowserPanel();

	SplitPanel* split1 = new SplitPanel(SplitPanel::horz);
	split1->setPanel1(panel1);
	split1->setPanel2(panel2);
	panel1->setSize(400,400);

	SplitPanel* split2 = new SplitPanel(SplitPanel::vert);
	split2->setPanel1(panel3);
	split2->setPanel2(panel4);
	panel3->setSize(200,200);
	panel1->setLayout(new AWTBorderLayout());
	panel1->add("Center", split2);
	
	SplitPanel* split3 = new SplitPanel(SplitPanel::vert);
	split3->setPanel1(panel5);
	split3->setPanel2(panel6);
	panel5->setSize(200,200);
	panel2->setLayout(new AWTBorderLayout());
	panel2->add("Center", split3);
	
	setLayout(new AWTBorderLayout());
	add("Center", split1);
}
